import request from '@/utils/request'

export default {
  // 添加数据
  addFigureInfo(historyFigure) {
    return request({
      url: '/visualization/historyfigure/addFigureInfo',
      method: 'post',
      data: historyFigure
    })
  },

  // 查询基本信息
  getFigureInfo(figureId) {
    return request({
      url: `/visualization/historyfigure/getFigureInfo/${figureId}`,
      method: 'get'
    })
  },

  // 更新基本信息 对象中需要包含 id
  updateFigureInfo(historyFigure) {
    return request({
      url: '/visualization/historyfigure/updateFigureInfo',
      method: 'post',
      data: historyFigure
    })
  },
  // 条件查询带分页
  pageFigureCondition(current, limit, figureQuery) {
    return request({
      url: `/visualization/historyfigure/pageFigureCondition/${current}/${limit}`,
      method: 'post',
      data: figureQuery
    })
  },
    // 删除人物
    deleteFigure(figureId) {
      return request({
        url: `/visualization/historyfigure/deleteFigure/${figureId}`,
        method: 'delete',
      })
    },
  // 删除人物
  getFigureCity() {
    return request({
      url: `/visualization/index/getFigureCity`,
      method: 'get',
    })
  },
}
